package com.bileetacrm;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class BileetaCRMDBLoader extends SQLiteOpenHelper {

	// Database Name
	private static String DATABASE_NAME = "bileetacrm.db";
	// Master Tables BBM
	private String NEWLEED_TABLE = "newleed";
	private SQLiteDatabase mydb;
	private static final int DATABASE_VERSION = 1;
	private static final String TAG = null;

	public BileetaCRMDBLoader(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
		// this.myContext = context;
	}

	@Override
	public void onCreate(SQLiteDatabase mydb) {
		try {
			mydb.execSQL("create table if not exists "
					+ NEWLEED_TABLE
					+ "(newleed_id integer primary key autoincrement,Name text not null,Company text not null,MobileNo text not null,SalesUnit text not null,Accountowner text not null,Leadsource text not null,Leadstatus text not null,NICNo text not null,Designation text not null,Phone1 text not null,Phone2 text not null,Email text not null,Rating text not null,Industry text not null,Website text not null,NoofEmployees text not null,AnnualRevenue text not null);");

		} catch (Exception e) {
		}
	}

	@Override
	public void onUpgrade(SQLiteDatabase mydb, int oldVersion, int newVersion) {
		// on upgrade drop older tables
		// *****Sales Order Transaction Table *****

		Log.v(TAG, "onUpgrade Call");
	}
}
